<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNNKit: MNNFaceDetector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="mnn.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNNKit
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">MNNKit is a collection of AI solutions on mobile phone, powered by MNN engine.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Instance Methods</a> &#124;
<a href="#pub-static-methods">Class Methods</a> &#124;
<a href="interface_m_n_n_face_detector-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">MNNFaceDetector Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Face Detector Class.  
 <a href="interface_m_n_n_face_detector.html#details">More...</a></p>

<p><code>#import &lt;<a class="el" href="_m_n_n_face_detector_8h_source.html">MNNFaceDetector.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MNNFaceDetector:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_m_n_n_face_detector.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:a602ad01ca588e7200d7c1222502ce2fc"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; <a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_face_detector.html#a602ad01ca588e7200d7c1222502ce2fc">inference:config:angle:outAngle:flipType:error:</a></td></tr>
<tr class="separator:a602ad01ca588e7200d7c1222502ce2fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab99ad14d38c89ced5dcb31b069f30e74"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; <a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_face_detector.html#ab99ad14d38c89ced5dcb31b069f30e74">inferenceImage:config:angle:outAngle:flipType:error:</a></td></tr>
<tr class="separator:ab99ad14d38c89ced5dcb31b069f30e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8a0086554b2aef9543d64c865013e0"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; <a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_face_detector.html#a8c8a0086554b2aef9543d64c865013e0">inference:width:height:format:config:angle:outAngle:flipType:error:</a></td></tr>
<tr class="separator:a8c8a0086554b2aef9543d64c865013e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Class Methods</h2></td></tr>
<tr class="memitem:afba9d69080161aa2b737e6f278f2eca1"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_m_n_n_face_detector.html#afba9d69080161aa2b737e6f278f2eca1">createInstanceAsync:callback:</a></td></tr>
<tr class="separator:afba9d69080161aa2b737e6f278f2eca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab07d8dcc069e6431321e2daf04b2514a"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_m_n_n_face_detector.html#ab07d8dcc069e6431321e2daf04b2514a">createInstanceAsync:callback:callbackQueue:</a></td></tr>
<tr class="separator:ab07d8dcc069e6431321e2daf04b2514a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Face Detector Class. </p>
</div><h2 class="groupheader">Method Documentation</h2>
<a id="afba9d69080161aa2b737e6f278f2eca1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afba9d69080161aa2b737e6f278f2eca1">&#9670;&nbsp;</a></span>createInstanceAsync:callback:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (void) createInstanceAsync: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_m_n_n_face_detector_create_config.html">MNNFaceDetectorCreateConfig</a> *)&#160;</td>
          <td class="paramname"><em>config</em></td>
        </tr>
        <tr>
          <td class="paramkey">callback:</td>
          <td></td>
          <td class="paramtype">(void(^)(NSError *error, <a class="el" href="interface_m_n_n_face_detector.html">MNNFaceDetector</a> *faceDetector))&#160;</td>
          <td class="paramname"><em>block</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>create face detector instance asynchronously, call back in in main thread. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>config parameter on create, such as video detection or image detection </td></tr>
    <tr><td class="paramname">block</td><td>call back after created, error is nil if call back successfully </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab07d8dcc069e6431321e2daf04b2514a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab07d8dcc069e6431321e2daf04b2514a">&#9670;&nbsp;</a></span>createInstanceAsync:callback:callbackQueue:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (void) createInstanceAsync: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_m_n_n_face_detector_create_config.html">MNNFaceDetectorCreateConfig</a> *)&#160;</td>
          <td class="paramname"><em>config</em></td>
        </tr>
        <tr>
          <td class="paramkey">callback:</td>
          <td></td>
          <td class="paramtype">(void(^)(NSError *error, <a class="el" href="interface_m_n_n_face_detector.html">MNNFaceDetector</a> *faceDetector))&#160;</td>
          <td class="paramname"><em>block</em></td>
        </tr>
        <tr>
          <td class="paramkey">callbackQueue:</td>
          <td></td>
          <td class="paramtype">(dispatch_queue_t)&#160;</td>
          <td class="paramname"><em>callbackQueue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>create face detector instance asynchronously, call back in designated thread. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>config parameter on create, such as video detection or image detection </td></tr>
    <tr><td class="paramname">block</td><td>call back after created, error is nil if call back successfully </td></tr>
    <tr><td class="paramname">callbackQueue</td><td>call back int this designated thread, in main thread if nil. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a602ad01ca588e7200d7c1222502ce2fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a602ad01ca588e7200d7c1222502ce2fc">&#9670;&nbsp;</a></span>inference:config:angle:outAngle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;<a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> *&gt; *) inference: </td>
          <td></td>
          <td class="paramtype">(CVPixelBufferRef)&#160;</td>
          <td class="paramname"><em>pixelBuffer</em></td>
        </tr>
        <tr>
          <td class="paramkey">config:</td>
          <td></td>
          <td class="paramtype">(MNNFaceDetectConfig)&#160;</td>
          <td class="paramname"><em>detectConfig</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">outAngle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>outAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>flipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference using system camera as input. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pixelBuffer</td><td>input dat in CVPixelBufferRef format </td></tr>
    <tr><td class="paramname">detectConfig</td><td>detect config, see also MNNFaceDetectConfig enum </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the face would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outAngle</td><td>output angle, the coordinate of raw output feature points will rotate outAngle degree in in the image coordinate system. Generally in order to reach the same direction with the rendering coordinate system, then feature points will be easily rendered. </td></tr>
    <tr><td class="paramname">flipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8c8a0086554b2aef9543d64c865013e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c8a0086554b2aef9543d64c865013e0">&#9670;&nbsp;</a></span>inference:width:height:format:config:angle:outAngle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;<a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> *&gt; *) inference: </td>
          <td></td>
          <td class="paramtype">(unsigned char *)&#160;</td>
          <td class="paramname"><em>data</em></td>
        </tr>
        <tr>
          <td class="paramkey">width:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>w</em></td>
        </tr>
        <tr>
          <td class="paramkey">height:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>h</em></td>
        </tr>
        <tr>
          <td class="paramkey">format:</td>
          <td></td>
          <td class="paramtype">(MNNCVImageFormat)&#160;</td>
          <td class="paramname"><em>format</em></td>
        </tr>
        <tr>
          <td class="paramkey">config:</td>
          <td></td>
          <td class="paramtype">(MNNFaceDetectConfig)&#160;</td>
          <td class="paramname"><em>detectConfig</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">outAngle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>outAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>flipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference using common data input </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>input data, int unsigned char format </td></tr>
    <tr><td class="paramname">w</td><td>data width </td></tr>
    <tr><td class="paramname">h</td><td>data height </td></tr>
    <tr><td class="paramname">format</td><td>data format </td></tr>
    <tr><td class="paramname">detectConfig</td><td>detect config, see also MNNFaceDetectConfig enum </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the face would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outAngle</td><td>output angle, the coordinate of raw output feature points will rotate outAngle degree in in the image coordinate system. Generally in order to reach the same direction with the rendering coordinate system, then feature points will be easily rendered. </td></tr>
    <tr><td class="paramname">flipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab99ad14d38c89ced5dcb31b069f30e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab99ad14d38c89ced5dcb31b069f30e74">&#9670;&nbsp;</a></span>inferenceImage:config:angle:outAngle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;<a class="el" href="interface_m_n_n_face_detection_report.html">MNNFaceDetectionReport</a> *&gt; *) inferenceImage: </td>
          <td></td>
          <td class="paramtype">(UIImage *)&#160;</td>
          <td class="paramname"><em>image</em></td>
        </tr>
        <tr>
          <td class="paramkey">config:</td>
          <td></td>
          <td class="paramtype">(MNNFaceDetectConfig)&#160;</td>
          <td class="paramname"><em>detectConfig</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">outAngle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>outAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>flipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference image </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>image in UIImage format </td></tr>
    <tr><td class="paramname">detectConfig</td><td>detect config, see also MNNFaceDetectConfig enum </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the face would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outAngle</td><td>output angle, the coordinate of raw output feature points will rotate outAngle degree in in the image coordinate system. Generally in order to reach the same direction with the rendering coordinate system, then feature points will be easily rendered. </td></tr>
    <tr><td class="paramname">flipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>MNNFaceDetection/iOS/MNNFaceDetection/MNNFaceDetection/<a class="el" href="_m_n_n_face_detector_8h_source.html">MNNFaceDetector.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
